using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Mud.Client.WPF
{
    /// <summary>
    /// Interaction logic for WindowConnectionSettings.xaml
    /// </summary>

    public partial class WindowConnectionSettings : System.Windows.Window
    {

        public string IPAddress
        {
            get { return txtAddress.Text; }
        }

        public int IPPort
        {
            get { return int.Parse(txtPort.Text); }
        }

        public string Username
        {
            get { return txtUserName.Text; }
        }

        public string Password
        {
            get { return txtPassword.Text; }
        }


        public WindowConnectionSettings()
        {
            InitializeComponent();
            txtUserName.Text = Environment.UserName;
        }

        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
            this.Close();
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
            this.Close();
        }

    }
}